extends "../cTDW_1/cTDW_1.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "剑圣"
	lv = 3
	attCoe.atkRan = 1
	attCoe.atk = 45 / 8.5 * 2 / 3
	attCoe.maxHp = 800 / 112.5 / 3
	addCdSkill("jslyz",8)
	addSkillTxt("撼地波：暴击时对当前敌人及其周围一格的敌人额外造成80%物强伤害")
	addSkillTxt("烈焰斩：对当前敌人造成180%物理伤害，敌人若存在<结霜>状态，则对该敌人增伤48%；否则添加2层<烧灼>[cd:8秒]")

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "jslyz" && aiCha != null:
		var dmg = att.atk * 1.8
		if aiCha.hasBuff("b_jieShuang"):
			dmg *= 1.48
		else:
			aiCha.addBuff(b_shaoZhuo.new(2))
		hurtChara(aiCha,dmg,Chara.HurtType.PHY,Chara.AtkType.SKILL)

func _onAtkInfo(atkinfo):
	if atkinfo.isCri:
		cst("撼地波","000000",position)
		var cha = atkinfo.hitCha
		var chas = getAllChas(1)
		for i in chas:
			if abs(i.cell.x - cha.cell.x) <= 1 && abs(i.cell.y - cha.cell.y) <= 1:
				if !i:
					hurtChara(i,att.atk * 0.8,Chara.HurtType.PHY,Chara.AtkType.EFF)
	._onAtkInfo(atkinfo)


